package csc.daonjpa.java.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.PrimaryKeyJoinColumn;

@Entity
@PrimaryKeyJoinColumn(referencedColumnName = "id_number" )
public class Card extends BaseInfo {
	private static final long serialVersionUID = 1L;
	@Column(name = "cardType")
	private String cardType;
	
	@ManyToOne
	@JoinColumn(name="id_customer")
	private Customer customer;
	
	
	public Card() {
		
	}
	public Card(Double availableAmount, String cardType) {
		super(availableAmount);
		this.cardType = cardType;
	}
	public Card(Double availableAmount, String cardType,Customer customer) {
		super(availableAmount);
		this.cardType = cardType;
		this.customer = customer;
	}
	public String getCardType() {
		return cardType;
	}
	public void setCardType(String cardType) {
		this.cardType = cardType;
	}

	public Customer getCustomer() {
		return customer;
	}
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}
}
